<template>
  <h1>欢迎来到登录界面</h1>
  <el-button @click="goHome" type="primary">回到首页1</el-button>
</template>

<script>
export default {
  name: 'Login',
  methods: {
    goHome() {
      this.$router.push('welcome')
      this.$storage.clearAll()
    }
  },
  mounted() {
    // this.$request({
    //   methods: 'get',
    //   url: '/login',
    //   data: {
    //     name: 'jack'
    //   }
    // }).then((res) => {
    //   console.log(res)
    // })
    this.$request.get('/login', {}).then((res) => {
      this.$storage.setItem('login', res)
    })
  }
}
</script>

<style scoped></style>
